import * as API from '@/api/index.js'

export function fetchList(query) {
  return API.REQUEST({
    url: '/api-shop/admin/user/list',
    method: 'get',
    params: query
  })
}

export function createUser(data) {
  return API.REQUEST({
    url: '/api-shop/admin/user/create',
    method: 'post',
    data
  })
}

export function readUser(data) {
  return API.REQUEST({
    url: '/api-shop/admin/user/detail',
    method: 'get',
    data
  })
}

export function updateUser(data) {
  return API.REQUEST({
    url: '/api-shop/admin/user/update',
    method: 'post',
    data
  })
}

export function listAddress(query) {
  return API.REQUEST({
    url: '/api-shop/admin/address/list',
    method: 'get',
    params: query
  })
}

export function listCollect(query) {
  return API.REQUEST({
    url: '/api-shop/admin/collect/list',
    method: 'get',
    params: query
  })
}

export function listFeedback(query) {
  return API.REQUEST({
    url: '/api-shop/admin/feedback/list',
    method: 'get',
    params: query
  })
}

export function listFootprint(query) {
  return API.REQUEST({
    url: '/api-shop/admin/footprint/list',
    method: 'get',
    params: query
  })
}

export function listHistory(query) {
  return API.REQUEST({
    url: '/api-shop/admin/history/list',
    method: 'get',
    params: query
  })
}

